package d7_collection_nesting;

import java.util.*;

/**
 * 2024/6/7 CJJ 集合的嵌套
 */
public class Test {
    public static void main(String[] args) {
        Map<String, List<String>> map=new HashMap<>();

        List<String> cities1 = new ArrayList<>();
        Collections.addAll(cities1,"南京市","扬州市","苏州市","无锡市","常州市");
        map.put("江苏省",cities1);

        List<String> cities2 = new ArrayList<>();
        Collections.addAll(cities2,"武汉市","孝感市","十堰市","宜昌市","鄂州市");
        map.put("湖北省",cities2);

        List<String> cities3 = new ArrayList<>();
        Collections.addAll(cities3,"石家庄市","唐山市","邢台市","保定市","张家口市");
        map.put("河北省",cities3);

        ArrayList<Object> objects = new ArrayList<>();
        Collections.addAll(objects,map);

        List<String> list = map.get("湖北省");
        for (String city : list) {
            System.out.println(city);

        }

    }
}
